package com.github.data_manage.dao

import com.blinkfox.fenix.jpa.QueryFenix
import com.github.data_manage.domain.po.FundDepthResearch
import com.github.data_manage.domain.vo.FundDepthResearchQueryVo
import org.springframework.data.repository.query.Param

interface FundDepthResearchDao : BaseDao<FundDepthResearch> {

    fun findByFundIdEquals(fundId: Int): FundDepthResearch?

    @QueryFenix(nativeQuery = true)
    fun findAllFundIds(
        @Param("invested") invested: Boolean?,
        @Param("aumRateCondition") aumRateCondition: String,
        @Param("meetingRateCondition") meetingRateCondition: String,
        @Param("investmentRateCondition") investmentRateCondition: String,
        @Param("screenOverallRateCondition") screenOverallRateCondition: String,
        @Param("keyManRateCondition") keyManRateCondition: String,
    ): List<Int>

    fun deleteAllByFundIdEquals(fundId: Int)
}
